package Demo8;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int num = s.nextInt();
        int[] list = new int[64];
        list[1] = list[7] = list[13] = list[23] = list[47] = list[59] = 1;
        int count = 0;

        if (num > 63) {
            System.out.println("false");
        } else {
            for (int i = 1; i <= num; i++) {
                if (list[i] == 1) {
                    count++;
                }
            }
            if (num + count > 64) {
                System.out.println("false");
            } else {
                System.out.println(count + num - 1);
            }

        }
    }


}
